<template>
<div>
  <h2>我是App组件</h2>
  {{count}}
  <hr/>
  <Child @changeCount="changeCount"></Child>
</div>
</template>


<script>
import Child from "@/components/Child";
export default {
    name : "App",
  components:{Child},
    data(){
      return{
        count:0,
      }
    },
  methods:{
      changeCount(value){
          this.count += value
      }
  }
}
</script>


<style></style>